package Model;

import java.awt.Point;
import java.util.ArrayList;

public abstract class Piece {
	private Color color;
	private int nbTurns;
	private Point point;
	
	public Piece(Point p, Color aColor)	{
		this.color = aColor;
		this.point = new Point(p);
	}
	
	public Color getColor()
	{
		return this.color;
	}
	
	public int getX() {
		return point.x;
	}
	public void setX(int x) {
		this.point.x = x;
	}
	public int getY() {
		return point.y;
	}
	public void setY(int y) {
		this.point.y = y;
	}
	public int getNbTurns()
	{
		return nbTurns;
	}
	public void incNbTurns()
	{
		nbTurns++;
	}

	public Point getPoint() {
		return point;
	}

	public void setPoint(Point point) {
		this.point = point;
	}
	
	public abstract char getChar();
	
	public abstract ArrayList<Point> getMovesPossibilities(int dirX, int dirY);
	
	public static boolean checkCoord(int coord)
	{
		if(coord >= 0 && coord < 8)
		{
			return true;
		}
		return false;
	}
}
